package edu.the.last.help;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.Box;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;

import edu.the.last.Messages;

public class AboutDialog extends JDialog {
	  /**
	 * 
	 */
	private static final long serialVersionUID = 8539436567089216598L;

	public AboutDialog(JFrame parent) {
	    super(parent, Messages.getString("AboutDialog.About"), true); //$NON-NLS-1$

	    Box b = Box.createVerticalBox();
	    b.add(Box.createGlue());
	    b.add(new JLabel(Messages.getString("AboutDialog.Creator"))); //$NON-NLS-1$
	    b.add(new JLabel(Messages.getString("AboutDialog.Advisor"))); //$NON-NLS-1$
	    b.add(new JLabel(Messages.getString("AboutDialog.SpecialTHX"))); //$NON-NLS-1$
	    b.add(Box.createGlue());
	    getContentPane().add(b, "Center"); //$NON-NLS-1$

	    JPanel p2 = new JPanel();
	    JButton ok = new JButton(Messages.getString("AboutDialog.OK")); //$NON-NLS-1$
	    p2.add(ok);
	    getContentPane().add(p2, "South");

	    ok.addActionListener(new ActionListener() {
	      public void actionPerformed(ActionEvent evt) {
	        setVisible(false);
	      }
	    });

	    setSize(520, 110);
	  }
}